
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<?php
require_once '../model/works.php';
require_once '../model/pagination.php';
$paginations=new pagination();
$keyword = new Works();
$keyword->table_name = "works";
?>
<?php
if (!isset($_GET["page"]))
    $page = 1;
else
    $page = $_GET["page"];
$keywords = $keyword->Page($page);
$total = $keyword->countPage();
var_dump($total);
echo $paginations->Paginations($page, $total,null,"index.php");
?>
<?php
foreach ($keywords as $item):
    echo $item["id"] . ": ";
    echo $item["name"] . "<br>";
endforeach;
?>
